<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns:jsf="http://xmlns.jcp.org/jsf"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html">   
        <fieldset>
            <legend>Cadastro de cidade</legend>
            <f:view>
                <h:form>
                    <label jsf:for="name">Nome:</label>
                    <br/>
                    <input type="text" size="60" required="true" jsf:id="name" 
                        jsf:value="${cityManagedBean.city.name}"/>            
                    <br/>
                    <label jsf:for="state">Estado:</label>
                    <br/>
                    <input type="text" size="60" required="true" jsf:id="state"
                        jsf:value="${cityManagedBean.city.state}"/>
                    <br/>
                    <label jsf:for="country">País:</label>
                    <br/>
                    <input type="text" size="60" required="true" jsf:id="country" 
                        jsf:value="${cityManagedBean.city.country}"/>                    
                    <br/>
                    <input type="submit" value="Salvar" jsf:action="${cityManagedBean.register}" class="button"/>                                                            
                    <input type="button" value="Cancelar" jsf:actionListener="${cityManagedBean.cancel}" class="button"/>                                                            
                </h:form>
            </f:view>
        </fieldset>        
</html>

